const bottomFiles = require.context('./', false, /\.vue$/)

const bottomTabs={}

bottomFiles.keys().forEach((key) => {
    //   tabs[key.replace(/(\.\/|\.vue)/g, '')] = files(key).default
        if(key=='./index.js'){
            return
        }
        let filename=  key.split('-')[1].replace(/(\.vue)/g, '')
        // let filename=key.replace(/(\.\/|\^[A-Z]|\-|\.vue)/g, '')
        let tab={
            label:filename,
            name:filename,
            component:bottomFiles(key).default
        }
        // topTabs[index]=tab
        bottomTabs[filename]=tab
})

export default bottomTabs